home *** CD-ROM | disk | FTP | other *** search
- /*
- HOW TO QUERY INTERFACES
- */
-
- l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
- if AddLibrary("rexxsupport.library","rxsocket.library")~=0 then exit
-
- res=QueryInterfaces("in")
- if res<0 then do
- say "cannot query ("errno()")"
- exit
- end
- if res==0 then do
- say "no interface (!?!)"
- exit
- end
-
- say "Found:" res "interface(s)"
- do i=0 to res-1
- say "---------------"i+1"---------------"
- say "Name: " in.i.NAME
- say "AFAddr:" in.i.IFADDRS
- if in.i.PPADDR~="" then say "PPAddr:" in.i.PPADDR
- if in.i.BADDR~="" then say "Baddr: " in.i.BADDR
- if in.i.NMASK~="" then say "NMask: " in.i.NMASK
- if in.i.METRIC~="" then say "Metric:" in.i.METRIC
- if in.i.MTU~="" then say "MTU: " in.i.MTU
- if in.i.IFWIRE~="" then say "IFWire:" in.i.IFWIRE
- say "Flags: " in.i.FLAGS":"
- if in.i.UP then say " UP"
- if in.i.BROADCAST then say " BROADCAST"
- if in.i.DEBUG then say " DEBUG"
- if in.i.LOOPBACK then say " LOOPBACK"
- if in.i.POINTTOPOINT then say " POINTTOPOINT"
- if in.i.NOTRAILERS then say " NOTRAILERS"
- if in.i.RUNNING then say " RUNNING"
- if in.i.NOARP then say " NOARP"
- if in.i.PROMISC then say " PROMISC"
- if in.i.ALLMULTI then say " ALLMULTI"
- if in.i.OACTIVE then say " OACTIVE"
- if in.i.SIMPLEX then say " SIMPLEX"
- if in.i.LINK0 then say " LINK0"
- if in.i.LINK1 then say " LINK1"
- if in.i.LINK2 then say " LINK2"
- if in.i.MULTICAST then say " MULTICAST"
- end
-